import http from '@/utils/http'

// 封装获取 Banner 的接口  
// params 对象中的 distributionSite 默认是 '1'
// 分类商品页是 传过来的是 '2'

export function getBannerAPI(params = {}) {
  const { distributionSite = '1'} = params
  return http({
    url:'/home/banner',
    params: {
      distributionSite
    }
  })
}

// 获取新鲜好物
export const getNewAPI = () => {
  return http({
    url:'/home/new'
  })
}

// 获取人气推荐
export const getHotAPI = () => {
  return  http({
    url: 'home/hot'
  })
}

// 获取所有商品模块

export const getGoodsAPI = () => {
  return http({
    url: '/home/goods'
  })
}